<template>
  <div
    class="header_wrapper"
    style="height:600px"
  >
    <Row
      style="padding:10px 13%;"
      type="flex"
      justify="space-between"
      class="header_nav"
    >
      <Col span="6">
      <img
        src="../assets/tit_log.png"
        alt=""
        srcset=""
      >
      </Col>
      <Col span="16">
      <Menu
        mode="horizontal"
        :active-name="activeName"
      >
        <MenuItem
          name="/index"
          to="/index"
        >
        <strong>首页</strong>
        <p>HOME</p>
        </MenuItem>
        <MenuItem
          name="/enter"
          to="/enter"
        >
        <strong>走进世贸</strong>
        <p>ENTER</p>
        </MenuItem>
        <MenuItem
          name="/dynamic"
          to="/dynamic"
        >
        <strong>世贸动态</strong>
        <p>DYNAMIC</p>
        </MenuItem>
        <MenuItem
          name="/service"
          to="/service"
        >
        <strong>世贸服务</strong>
        <p>SERVICE</p>
        </MenuItem>
        <MenuItem
          name="/invest"
          to="/invest"
        >
        <strong>招商引资</strong>
        <p>RECRUIT</p>
        </MenuItem>
        <MenuItem
          name="/aboutus"
          to="/aboutus"
        >
        <strong>关于我们</strong>
        <p>ABOUT US</p>
        </MenuItem>
      </Menu>
      </Col>

    </Row>
    <Row class="header_banner">
      <Col :lg="{span:24}">
      <div class="shutter">
        <div class="shutter-img">
          <a
            :href="'javascript:void(0);'"
            :data-shutter-title="item.title"
            v-for="(item,index) in list"
            :key="index"
          >
            <img
              :src="item.img"
              alt=""
            >
          </a>
        </div>
        <ul class="shutter-btn">
          <li class="prev"></li>
          <li class="next"></li>
        </ul>
        <div class="shutter-desc">
          <p>Iron Man</p>
        </div>
      </div>
      </Col>
    </Row>
  </div>

</template>

<script>
require('../../public/js/shutter.js')

export default {
  data() {
    return {
      activeName: this.$route.path.split("/", 2).join("/"),
      list: []
    }
  },
  created() {
    this.$axios.get('/carousel').then(res => {
      console.log(res)
      this.list = res.data.list

      setTimeout(() => {
        $(".shutter").shutter({
          shutterW: 1920, // 容器宽度
          shutterH: 600, // 容器高度
          isAutoPlay: true, // 是否自动播放
          playInterval: 3000, // 自动播放时间
          curDisplay: 3, // 当前显示页
          fullPage: true // 是否全屏展示
        });
      }, 0);
    })

  },
  mounted() {



  },
}
</script>

<style scoped lang="less">
.header_wrapper {
  background: #6893be;
  position: relative;
  .header_nav {
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 99;
  }
  .header_banner {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    .shutter {
      width: 100% !important;
      height: 600px !important;
      img {
        height: 100%;
      }
    }
  }
  .ivu-col {
    img {
      width: 100%;
    }

    .ivu-menu {
      display: flex;
      justify-content: space-between;
    }
    .ivu-menu-light.ivu-menu-horizontal .ivu-menu-item-active,
    .ivu-menu-light.ivu-menu-horizontal .ivu-menu-item:hover,
    .ivu-menu-light.ivu-menu-horizontal .ivu-menu-submenu-active,
    .ivu-menu-light.ivu-menu-horizontal .ivu-menu-submenu:hover {
      color: #fff;
      border-bottom: none !important;
      background: rgba(0, 0, 0, 0.5);
      border-radius: 5px;
    }
    .ivu-menu-horizontal {
      line-height: 30px;
      text-align: center;
      .ivu-menu-item {
        color: #fff;
        strong {
          font-size: 16px;
        }
        p {
          font-size: 12px;
        }
      }
    }
    .ivu-menu-horizontal::after {
      background: none;
    }
    .ivu-menu-light {
      background: none;
    }
  }
}
</style>